

package at.fhj.itm.metadata.impl.postgres;


import at.fhj.itm.metadata.impl.AbstractSequence;

/**
 *
 * @author Seuchter
 */
public class PostgresSequence extends AbstractSequence {

    private long oid;
    private PostgresSqlDataType type;

    private static final long SEQUENCE_MAX = 9223372036854775807L;

    public PostgresSequence(final String name)
    {
        super(name,0L,SEQUENCE_MAX,1L,1L,false);

    }

    public PostgresSequence(final String name, final long minValue, final long maxValue,
            final long step, final long curValue, final boolean cycle,final long oid)
    {
        super(name, minValue, maxValue, step, curValue, cycle);
        this.oid = oid;
    }
    public long getOid()
    {
        return oid;
    }

    public PostgresSequence copy(){
        return new PostgresSequence(getName(), getMinValue(), getMaxValue(),
                getIncrementStep(), getCurrentValue(), isCycle(), -1);
    }
}
